import React, { Component } from 'react'
import './css/fenye.scss'
export default class FenYe extends Component {
  constructor(){
    super();
    this.state={
      pageindex:1,
      list:[1,2,3,4,5]
    }
  }
  render() {
    return (
      <React.Fragment>
        <div>分页</div>
        <div className='box'>
        <div className='prev'>上一页</div>
        {this.state.list.map(item=><div className={item==this.state.pageindex?'items tive':'items'}>{item}</div>)}
        <div className='next'>下一页</div>
        </div>
      </React.Fragment>
    )
  }
}
